MOV CX, 40 ; 40 WORDs to search MOV DI, BUFFER ; DI points at the buffer MOV SI, SCREEN_OFFSET ; SI points at the screen offset START: MOV AX, [DI] ; 14 clocks -- get two chars from the buffer AND AX, 07F7FH ; 4 clocks -- turn off the high bits MOV [SI], AX ; 14 clocks -- put the chars into screen ram ADD SI, 2 ; 4 clocks -- the next two chars in the buffer ADD DI, 2 ; 4 clocks -- the next two chars in screen ram LOOP START ; 17 clocks -- continue until CX is zero